<template>
	<view class="container">
		<view class="container-content">
			<view class="content-header">￥<text>{{orderDetail.realityPrice}}</text></view>
			<view class="content-box">
				<view><text>订单编号：</text>{{orderDetail.orderNo}}</view>
				<view><text>下单时间：</text>{{orderDetail.createTime}}</view>
				<view><text>支付方式：</text>微信支付</view>
			</view>
		</view>
		<view class="container-btn" @click="goOrderDetail">查看订单</view>
	</view>

</template>
<script>
	export default {
		data() {
			return {
				orderDetail: {},
				orderId: '',
			}
		},
		onLoad(options) {
			const {
				orderId
			} = options;
			this.orderId = orderId
		},
		onShow() {
			this.getOrderDetail()
		},
		methods: {
			async getOrderDetail() {
				const {
					orderId
				} = this;
				let result = await this.$request.miniOrderDetail({
					orderId
				})
				console.log(result)
				this.orderDetail = result.data
			},
			  goOrderDetail() {
			    uni.redirectTo({ url: `/pages/premiumBag/mine/orderDetail?orderId=${this.orderId}` });
			  },
		}
	}
</script>
<style>
	.container {
		width: 100%;
		height: 100%;
		background-color: #fff;
		display: flex;
		flex-direction: column;
		align-items: center;
		font-size: 28rpx;
		color: #333;
	}

	.container-header {
		width: 100%;
		height: 440rpx;
		background-image: url(https://636c-cloud1-4gp5zzrm084ca469-1318347747.tcb.qcloud.la/pay-head.png?sign=cbf44b38692cb57e6fbe4213f91ae7c9&t=1686650197);
		background-size: 100% 100%;
	}

	.container-header>view {
		padding-left: 12rpx;
		display: flex;
		justify-content: flex-start;
	}

	.container-content {
		width: 646rpx;
		height: 474rpx;
		background-image: url(https://636c-cloud1-4gp5zzrm084ca469-1318347747.tcb.qcloud.la/pay-box.png?sign=b8c5ed6986fe6635d2269d761e9a3d1e&t=1686650284);
		background-size: 100% 100%;
		position: relative;
		top: -110rpx;
	}

	.content-header {
		width: 100%;
		height: 138rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.content-header>text {
		font-size: 50rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
	}

	.content-box {
		padding: 48rpx 60rpx;
		box-sizing: border-box;
	}

	.content-box>view {
		margin-bottom: 30rpx;
	}

	.content-box>view text {
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
		font-size: 24rpx;
	}

	.container-btn {
		width: 500rpx;
		height: 70rpx;
		background: #3EB89E;
		border-radius: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #fff;
		font-family: PingFang SC-Medium, PingFang SC;
	}
</style>
